﻿<%@ WebService Language="C#" Class="WSA.Manager_WS_Profiler" %>
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
using Dimok.Exceptions;
using Dimok.Web.UI;

namespace WSA {

	[WebService(Namespace = "http://motobankcorp.com/Profiler")]
	[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
	[System.Web.Script.Services.ScriptService]
	public class Manager_WS_Profiler : System.Web.Services.WebService {

		[WebMethod]
		public string SaveFontSize(string pageType, string size) {
			var p = new Profiler(HttpContext.Current.Profile, pageType);
			if (size != "") {
				p.Page.FontSize = size;
				p.Save();
			} else size = p.Page.FontSize;
			var Response = HttpContext.Current.Response;
			Response.ContentType = "text/css";
			Response.Write("HTML{font-size:" + size + "}");
			Response.End();
			return "";
		}
		[WebMethod]
		public void SavePagePosition(string pageName, int top, int left, int width, int height) {
			ProfilerAjax.SavePagePosition(pageName, top, left, width, height);
			return;
		}
		[WebMethod]
		public object GetPagePosition(string pageName) {
			return ProfilerAjax.GetPagePosition(pageName);
		}

	}
}

